{extend name="Home/Theme/Theme1/base" /}

{block name="meta"}
<meta name="keywords" content="{$article['keywords']}">
<meta name="description" content="{$article['description']}">
{/block}

{block name="title"}{$article['name']}_{/block}

{block name="style"}
<style type="text/css">
    header.intro-header{
        position: relative;
        background-image: url('/');
    }
    @media all and (min-width: 800px) {
        .anchorjs-link{
            position: absolute;
            left: -0.75em;
            font-size: 1.1em;
            margin-top : -0.1em;
        }
    }
</style>
{/block}

<!--{block name="search"}-->
<!-- <input name="nav_id" value="{$article['navs_id']}" type="hidden" />-->
<!-- <input name="search" size="11" id="edtSearch" type="text">-->
<!--{/block}-->
{block name="main"}
<header class="intro-header" style="background-image: url(&#39;/&#39;)">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 ">
                <div class="site-heading">
                    <h1>{$article['name']}</h1>
                    <span class="subheading">{$article['description']}</span>
                    <span class="meta">{$article['update_time']}</span>
                </div>
            </div>
        </div>
    </div>
</header>
<article>
    <div class="container" style="overflow:hidden">
        <div class="row">

            <!-- Post Container -->
            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                post-container">
                {$article['content']|raw}
            </div>

<!--            <div class="-->
<!--                col-lg-2 col-lg-offset-0-->
<!--                visible-lg-block-->
<!--                sidebar-container-->
<!--                catalog-container">-->
<!--                <div class="side-catalog">-->
<!--                    <hr class="hidden-sm hidden-xs">-->
<!--                    <h5>-->
<!--                        <a class="catalog-toggle" href="/#">CATALOG</a>-->
<!--                    </h5>-->
<!--                    <ul class="catalog-body">-->
<!--                        <li class="h3_nav"><a href="/articles/{$article['id']}.html/#%E4%B8%80%E5%BC%95%E8%A8%80" rel="nofollow">一、引言</a></li>-->
<!--                        <li class="h3_nav"><a href="/articles/{$article['id']}.html/#%E4%BA%8Candroid%E6%9E%B6%E6%9E%84" rel="nofollow">二、Android架构</a></li>-->
<!--                        <li class="h4_nav"><a href="/articles/{$article['id']}.html/#21-linux%E5%86%85%E6%A0%B8%E5%B1%82" rel="nofollow">2.1 Linux内核层</a></li>-->
<!--                    </ul>-->
<!--                </div>-->
<!--            </div>-->

            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                sidebar-container">

                <!-- Featured Tags -->

                {include file="Home/Theme/Theme1/tag" /}
            </div>

        </div>
    </div>
</article>

{/block}

{block name="js"}
<script type="text/javascript">
    function generateCatalog (selector) {
        var P = $('div.post-container'),a,n,t,l,i,c;
        a = P.find('h1,h2,h3,h4,h5,h6');
        a.each(function () {
            n = $(this).prop('tagName').toLowerCase();
            i = "#"+$(this).prop('id');
            t = $(this).text();
            c = $('<a href="'+i+'" rel="nofollow">'+t+'</a>');
            l = $('<li class="'+n+'_nav"></li>').append(c);
            $(selector).append(l);
        });
        return true;
    }

    generateCatalog(".catalog-body");

    // toggle side catalog
    $(".catalog-toggle").click((function(e){
        e.preventDefault();
        $('.side-catalog').toggleClass("fold")
    }))

    async("/js/jquery.nav.js", function () {
        $('.catalog-body').onePageNav({
            currentClass: "active",
            changeHash: !1,
            easing: "swing",
            filter: "",
            scrollSpeed: 700,
            scrollOffset: 0,
            scrollThreshold: .2,
            begin: null,
            end: null,
            scrollChange: null,
            padding: 80
        });
    });
    async("http://cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js",function(){
        anchors.options = {
            visible: 'always',
            placement: 'right',
            icon: '#'
        };
        anchors.add().remove('.intro-header h1').remove('.subheading').remove('.sidebar-container h5');
    })
</script>
{/if}
{/block}